<!DOCTYPE html>
<!-- release v4.3.3, copyright 2014 - 2016 Kartik Visweswaran -->
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <title>Krajee JQuery Plugins - &copy; Kartik</title>
        <link href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
        <link href="css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
        <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
        <script src="js/fileinput.js" type="text/javascript"></script>
        <script src="js/locales/zh.js" type="text/javascript"></script>
        <script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="js/stream-v1.js"></script>
        <!--[if lt IE 9]>
            <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.min.js"></script>
            <script src="http://cdn.bootcss.com/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="container kv-main">
            <form enctype="multipart/form-data">
                <div class="form-group">
                    <input id="file-1" type="file" multiple class="file" data-preview-file-type="any" data-min-file-count="1">
                </div>
            </form>
        </div>
    </body>
	<script>
    var fileinput = $("#file-1").fileinput({
    	streamConfig: {
				swfURL : "swf/FlashUploader.swf",
        		frmUploadURL : "fd;", /** Flash上传的URI */
    			tokenURL : "tk", /** 根据文件名、大小等信息获取Token的URI（用于生成断点续传、跨域的令牌） */
    			uploadURL : "upload", /** HTML5上传的URI */

    			enabled: true, /** 是否启用文件选择，默认是true */
    			customered: true,
    			multipleFiles: true, /** 是否允许同时选择多个文件，默认是false */	
    			autoUploading: false, /** 当选择完文件是否自动上传，默认是true */
    			fileFieldName: "FileData", /** 相当于指定<input type="file" name="FileData">，默认是FileData */
    			maxSize: 2147483648, /** 当_t.bStreaming = false 时（也就是Flash上传时），2G就是最大的文件上传大小！所以一般需要 */
    			simLimit: 10000, /** 允许同时选择文件上传的个数（包含已经上传过的） */
//        		extFilters: [".txt", ".gz", ".jpg", ".png", ".jpeg", ".gif", ".avi", ".html", ".htm"], /** 默认是全部允许，即 [] */
				onQueueComplete: function() {
					
					console.log('!!!', arguments);
				}
   		}
	});
    var events = "change fileselect fileclear filecleared fileloaded filereset fileimageloaded fileimagesloaded fileimageresized fileimageresized filebrowse filebatchselected fileselectnone filelock fileunlock filepredelete filedeleted filepreajax filepreupload fileuploaded filebatchpreupload filebatchuploadsuccess filebatchuploadcomplete filesuccessremove filedisabled fileenabled filesorted filezoomshow filezoomshown filezoomhide filezoomloaded filezoomprev filezoomnext fileerror fileimageresizeerror fileuploaderror filebatchuploaderror filedeleteerror filefoldererror filecustomerror";
    $.each(events.split(' '), function(i, key) {
    	$("#file-1").bind(key, function() {
    		//console.log(key+ "@@@", arguments);
    	});
    });
</script>
</html>